<?php

namespace Tuobaye\FilamentAdmin;

use Filament\Contracts\Plugin;
use Filament\FontProviders\LocalFontProvider;
use Filament\Panel;
use Tuobaye\FilamentAdmin\Pages\Login;
use Tuobaye\FilamentAdmin\Resources\RoleResource;
use Tuobaye\FilamentAdmin\Resources\UserResource;

class FilamentAdmin implements Plugin
{

    public static function make(): static
    {
        return app(static::class);
    }

    public function getId(): string
    {
        return 'filament-admin';
    }

    public function register(Panel $panel): void
    {
        $panel
            ->login(Login::class)
            ->font('', '', LocalFontProvider::class)
            ->resources([
                UserResource::class,
                RoleResource::class
            ])
            ->authGuard(config('filament-admin.auth.guard'));
    }

    public function boot(Panel $panel): void
    {

    }
}
